package com.cvmars.jianyou.module.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;

import com.cvmars.jianyou.R;
import com.cvmars.jianyou.module.adapter.HomeTaskTypeAdapter;
import com.cvmars.jianyou.module.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class TaskDetailActivity extends BaseActivity {

    HomeTaskTypeAdapter taskTypeAdapter;
    @BindView(R.id.list_task)
    RecyclerView listTask;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_task_detail);
        ButterKnife.bind(this);

        listTask.setLayoutManager(new LinearLayoutManager(
                this, LinearLayoutManager.VERTICAL, false));
        List<String> data = new ArrayList<>();
        data.add("1");
        data.add("1");
        data.add("1");
        taskTypeAdapter = new HomeTaskTypeAdapter(R.layout.item_task_detail, data);

        View headerView = LayoutInflater.from(this).inflate(R.layout.header_task_detail,null);
        taskTypeAdapter.addHeaderView(headerView);
        listTask.setAdapter(taskTypeAdapter);
    }
}
